Optimal. Leaf size=254 \[ -\frac {\left (a^2-b^2\right )^3 (a+b \sin (c+d x))^{1+m}}{b^7 d (1+m)}+\frac {6 a \left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{2+m}}{b^7 d (2+m)}-\frac {3 \left (5 a^4-6 a^2 b^2+b^4\right ) (a+b \sin (c+d x))^{3+m}}{b^7 d (3+m)}+\frac {4 a \left (5 a^2-3 b^2\right ) (a+b \sin (c+d x))^{4+m}}{b^7 d (4+m)}-\frac {3 \left (5 a^2-b^2\right ) (a+b \sin (c+d x))^{5+m}}{b^7 d (5+m)}+\frac {6 a (a+b \sin (c+d x))^{6+m}}{b^7 d (6+m)}-\frac {(a+b \sin (c+d x))^{7+m}}{b^7 d (7+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 254, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2747, 711}
\begin {gather*} -\frac {\left (a^2-b^2\right )^3 (a+b \sin (c+d x))^{m+1}}{b^7 d (m+1)}+\frac {6 a \left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{m+2}}{b^7 d (m+2)}+\frac {4 a \left (5 a^2-3 b^2\right ) (a+b \sin (c+d x))^{m+4}}{b^7 d (m+4)}-\frac {3 \left (5 a^2-b^2\right ) (a+b \sin (c+d x))^{m+5}}{b^7 d (m+5)}-\frac {3 \left (5 a^4-6 a^2 b^2+b^4\right ) (a+b \sin (c+d x))^{m+3}}{b^7 d (m+3)}+\frac {6 a (a+b \sin (c+d x))^{m+6}}{b^7 d (m+6)}-\frac {(a+b \sin (c+d x))^{m+7}}{b^7 d (m+7)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 2747
Rubi steps
\begin {align*} \int \cos ^7(c+d x) (a+b \sin (c+d x))^m \, dx &=\frac {\text {Subst}\left (\int (a+x)^m \left (b^2-x^2\right )^3 \, dx,x,b \sin (c+d x)\right )}{b^7 d}\\ &=\frac {\text {Subst}\left (\int \left (-\left (a^2-b^2\right )^3 (a+x)^m+6 a \left (a^2-b^2\right )^2 (a+x)^{1+m}-3 \left (5 a^4-6 a^2 b^2+b^4\right ) (a+x)^{2+m}+4 a \left (5 a^2-3 b^2\right ) (a+x)^{3+m}-3 \left (5 a^2-b^2\right ) (a+x)^{4+m}+6 a (a+x)^{5+m}-(a+x)^{6+m}\right ) \, dx,x,b \sin (c+d x)\right )}{b^7 d}\\ &=-\frac {\left (a^2-b^2\right )^3 (a+b \sin (c+d x))^{1+m}}{b^7 d (1+m)}+\frac {6 a \left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{2+m}}{b^7 d (2+m)}-\frac {3 \left (5 a^4-6 a^2 b^2+b^4\right ) (a+b \sin (c+d x))^{3+m}}{b^7 d (3+m)}+\frac {4 a \left (5 a^2-3 b^2\right ) (a+b \sin (c+d x))^{4+m}}{b^7 d (4+m)}-\frac {3 \left (5 a^2-b^2\right ) (a+b \sin (c+d x))^{5+m}}{b^7 d (5+m)}+\frac {6 a (a+b \sin (c+d x))^{6+m}}{b^7 d (6+m)}-\frac {(a+b \sin (c+d x))^{7+m}}{b^7 d (7+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(854\) vs. \(2(254)=508\).
time = 3.08, size = 854, normalized size = 3.36 \begin {gather*} \frac {(a+b \sin (c+d x))^{1+m} \left (-23040 a^6+85248 a^4 b^2-121536 a^2 b^4+109728 b^6+12672 a^4 b^2 m-52944 a^2 b^4 m+143880 b^6 m-3456 a^4 b^2 m^2+840 a^2 b^4 m^2+74896 b^6 m^2+1392 a^2 b^4 m^3+20718 b^6 m^3+24 a^2 b^4 m^4+3286 b^6 m^4+282 b^6 m^5+10 b^6 m^6+3 b^2 \left (2+3 m+m^2\right ) \left (1920 a^4-32 a^2 b^2 \left (192+43 m+m^2\right )+b^4 \left (7176+4718 m+1139 m^2+122 m^3+5 m^4\right )\right ) \cos (2 (c+d x))+6 b^4 \left (24+50 m+35 m^2+10 m^3+m^4\right ) \left (-20 a^2+b^2 \left (54+15 m+m^2\right )\right ) \cos (4 (c+d x))+720 b^6 \cos (6 (c+d x))+1764 b^6 m \cos (6 (c+d x))+1624 b^6 m^2 \cos (6 (c+d x))+735 b^6 m^3 \cos (6 (c+d x))+175 b^6 m^4 \cos (6 (c+d x))+21 b^6 m^5 \cos (6 (c+d x))+b^6 m^6 \cos (6 (c+d x))+23040 a^5 b \sin (c+d x)-79488 a^3 b^3 \sin (c+d x)+103104 a b^5 \sin (c+d x)+23040 a^5 b m \sin (c+d x)-95040 a^3 b^3 m \sin (c+d x)+161136 a b^5 m \sin (c+d x)-14976 a^3 b^3 m^2 \sin (c+d x)+68376 a b^5 m^2 \sin (c+d x)+576 a^3 b^3 m^3 \sin (c+d x)+11064 a b^5 m^3 \sin (c+d x)+744 a b^5 m^4 \sin (c+d x)+24 a b^5 m^5 \sin (c+d x)-5760 a^3 b^3 \sin (3 (c+d x))+16992 a b^5 \sin (3 (c+d x))-10560 a^3 b^3 m \sin (3 (c+d x))+35400 a b^5 m \sin (3 (c+d x))-5760 a^3 b^3 m^2 \sin (3 (c+d x))+24996 a b^5 m^2 \sin (3 (c+d x))-960 a^3 b^3 m^3 \sin (3 (c+d x))+7476 a b^5 m^3 \sin (3 (c+d x))+924 a b^5 m^4 \sin (3 (c+d x))+36 a b^5 m^5 \sin (3 (c+d x))+1440 a b^5 \sin (5 (c+d x))+3288 a b^5 m \sin (5 (c+d x))+2700 a b^5 m^2 \sin (5 (c+d x))+1020 a b^5 m^3 \sin (5 (c+d x))+180 a b^5 m^4 \sin (5 (c+d x))+12 a b^5 m^5 \sin (5 (c+d x))\right )}{32 b^7 d (1+m) (2+m) (3+m) (4+m) (5+m) (6+m) (7+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.17, size = 0, normalized size = 0.00 \[\int \left (\cos ^{7}\left (d x +c \right )\right ) \left (a +b \sin \left (d x +c \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 558 vs.
\(2 (254) = 508\).
time = 0.31, size = 558, normalized size = 2.20 \begin {gather*} \frac {\frac {{\left (b \sin \left (d x + c\right ) + a\right )}^{m + 1}}{b {\left (m + 1\right )}} - \frac {3 \, {\left ({\left (m^{2} + 3 \, m + 2\right )} b^{3} \sin \left (d x + c\right )^{3} + {\left (m^{2} + m\right )} a b^{2} \sin \left (d x + c\right )^{2} - 2 \, a^{2} b m \sin \left (d x + c\right ) + 2 \, a^{3}\right )} {\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} b^{3}} + \frac {3 \, {\left ({\left (m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24\right )} b^{5} \sin \left (d x + c\right )^{5} + {\left (m^{4} + 6 \, m^{3} + 11 \, m^{2} + 6 \, m\right )} a b^{4} \sin \left (d x + c\right )^{4} - 4 \, {\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} a^{2} b^{3} \sin \left (d x + c\right )^{3} + 12 \, {\left (m^{2} + m\right )} a^{3} b^{2} \sin \left (d x + c\right )^{2} - 24 \, a^{4} b m \sin \left (d x + c\right ) + 24 \, a^{5}\right )} {\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{{\left (m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120\right )} b^{5}} - \frac {{\left ({\left (m^{6} + 21 \, m^{5} + 175 \, m^{4} + 735 \, m^{3} + 1624 \, m^{2} + 1764 \, m + 720\right )} b^{7} \sin \left (d x + c\right )^{7} + {\left (m^{6} + 15 \, m^{5} + 85 \, m^{4} + 225 \, m^{3} + 274 \, m^{2} + 120 \, m\right )} a b^{6} \sin \left (d x + c\right )^{6} - 6 \, {\left (m^{5} + 10 \, m^{4} + 35 \, m^{3} + 50 \, m^{2} + 24 \, m\right )} a^{2} b^{5} \sin \left (d x + c\right )^{5} + 30 \, {\left (m^{4} + 6 \, m^{3} + 11 \, m^{2} + 6 \, m\right )} a^{3} b^{4} \sin \left (d x + c\right )^{4} - 120 \, {\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} a^{4} b^{3} \sin \left (d x + c\right )^{3} + 360 \, {\left (m^{2} + m\right )} a^{5} b^{2} \sin \left (d x + c\right )^{2} - 720 \, a^{6} b m \sin \left (d x + c\right ) + 720 \, a^{7}\right )} {\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{{\left (m^{7} + 28 \, m^{6} + 322 \, m^{5} + 1960 \, m^{4} + 6769 \, m^{3} + 13132 \, m^{2} + 13068 \, m + 5040\right )} b^{7}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 814 vs.
\(2 (254) = 508\).
time = 0.45, size = 814, normalized size = 3.20 \begin {gather*} -\frac {{\left (720 \, a^{7} - 3024 \, a^{5} b^{2} + 5040 \, a^{3} b^{4} - 5040 \, a b^{6} - {\left (a b^{6} m^{6} + 15 \, a b^{6} m^{5} + 85 \, a b^{6} m^{4} + 225 \, a b^{6} m^{3} + 274 \, a b^{6} m^{2} + 120 \, a b^{6} m\right )} \cos \left (d x + c\right )^{6} - 6 \, {\left (2 \, a b^{6} m^{5} - {\left (5 \, a^{3} b^{4} - 23 \, a b^{6}\right )} m^{4} - 2 \, {\left (15 \, a^{3} b^{4} - 44 \, a b^{6}\right )} m^{3} - {\left (55 \, a^{3} b^{4} - 133 \, a b^{6}\right )} m^{2} - 6 \, {\left (5 \, a^{3} b^{4} - 11 \, a b^{6}\right )} m\right )} \cos \left (d x + c\right )^{4} - 192 \, {\left (a^{3} b^{4} + a b^{6}\right )} m^{3} + 288 \, {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} - 7 \, a b^{6}\right )} m^{2} - 24 \, {\left ({\left (a^{3} b^{4} + 3 \, a b^{6}\right )} m^{4} - 6 \, {\left (a^{3} b^{4} - 5 \, a b^{6}\right )} m^{3} + {\left (15 \, a^{5} b^{2} - 55 \, a^{3} b^{4} + 84 \, a b^{6}\right )} m^{2} + 3 \, {\left (5 \, a^{5} b^{2} - 16 \, a^{3} b^{4} + 19 \, a b^{6}\right )} m\right )} \cos \left (d x + c\right )^{2} - 192 \, {\left (3 \, a^{5} b^{2} - 13 \, a^{3} b^{4} + 32 \, a b^{6}\right )} m - {\left (2304 \, b^{7} + {\left (b^{7} m^{6} + 21 \, b^{7} m^{5} + 175 \, b^{7} m^{4} + 735 \, b^{7} m^{3} + 1624 \, b^{7} m^{2} + 1764 \, b^{7} m + 720 \, b^{7}\right )} \cos \left (d x + c\right )^{6} + 6 \, {\left (144 \, b^{7} + {\left (a^{2} b^{5} + b^{7}\right )} m^{5} + 2 \, {\left (5 \, a^{2} b^{5} + 8 \, b^{7}\right )} m^{4} + 5 \, {\left (7 \, a^{2} b^{5} + 19 \, b^{7}\right )} m^{3} + 10 \, {\left (5 \, a^{2} b^{5} + 26 \, b^{7}\right )} m^{2} + 12 \, {\left (2 \, a^{2} b^{5} + 27 \, b^{7}\right )} m\right )} \cos \left (d x + c\right )^{4} + 48 \, {\left (a^{4} b^{3} + 6 \, a^{2} b^{5} + b^{7}\right )} m^{3} - 576 \, {\left (a^{4} b^{3} - 4 \, a^{2} b^{5} - b^{7}\right )} m^{2} + 24 \, {\left (48 \, b^{7} + {\left (3 \, a^{2} b^{5} + b^{7}\right )} m^{4} - {\left (5 \, a^{4} b^{3} - 24 \, a^{2} b^{5} - 13 \, b^{7}\right )} m^{3} - {\left (15 \, a^{4} b^{3} - 51 \, a^{2} b^{5} - 56 \, b^{7}\right )} m^{2} - 2 \, {\left (5 \, a^{4} b^{3} - 15 \, a^{2} b^{5} - 46 \, b^{7}\right )} m\right )} \cos \left (d x + c\right )^{2} + 48 \, {\left (15 \, a^{6} b - 58 \, a^{4} b^{3} + 87 \, a^{2} b^{5} + 44 \, b^{7}\right )} m\right )} \sin \left (d x + c\right )\right )} {\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{b^{7} d m^{7} + 28 \, b^{7} d m^{6} + 322 \, b^{7} d m^{5} + 1960 \, b^{7} d m^{4} + 6769 \, b^{7} d m^{3} + 13132 \, b^{7} d m^{2} + 13068 \, b^{7} d m + 5040 \, b^{7} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 3579 vs.
\(2 (254) = 508\).
time = 4.22, size = 3579, normalized size = 14.09 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 19.09, size = 1196, normalized size = 4.71 \begin {gather*} \frac {{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (-a^7\,92160{}\mathrm {i}-a^5\,b^2\,m^2\,13824{}\mathrm {i}+a^5\,b^2\,m\,96768{}\mathrm {i}+a^5\,b^2\,387072{}\mathrm {i}+a^3\,b^4\,m^4\,96{}\mathrm {i}+a^3\,b^4\,m^3\,6720{}\mathrm {i}-a^3\,b^4\,m^2\,26592{}\mathrm {i}-a^3\,b^4\,m\,401856{}\mathrm {i}-a^3\,b^4\,645120{}\mathrm {i}+a\,b^6\,m^6\,40{}\mathrm {i}+a\,b^6\,m^5\,1176{}\mathrm {i}+a\,b^6\,m^4\,14632{}\mathrm {i}+a\,b^6\,m^3\,105000{}\mathrm {i}+a\,b^6\,m^2\,436336{}\mathrm {i}+a\,b^6\,m\,897792{}\mathrm {i}+a\,b^6\,645120{}\mathrm {i}\right )}{128\,b^7\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {\sin \left (7\,c+7\,d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (m^6+21\,m^5+175\,m^4+735\,m^3+1624\,m^2+1764\,m+720\right )\,1{}\mathrm {i}}{64\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {\sin \left (c+d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (46080\,a^6\,b\,m+1152\,a^4\,b^3\,m^3-42624\,a^4\,b^3\,m^2-182016\,a^4\,b^3\,m+48\,a^2\,b^5\,m^5+1632\,a^2\,b^5\,m^4+29328\,a^2\,b^5\,m^3+169440\,a^2\,b^5\,m^2+279936\,a^2\,b^5\,m+5\,b^7\,m^6+153\,b^7\,m^5+2027\,b^7\,m^4+16299\,b^7\,m^3+78968\,b^7\,m^2+194868\,b^7\,m+176400\,b^7\right )\,1{}\mathrm {i}}{64\,b^7\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {\sin \left (3\,c+3\,d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (m^2+3\,m+2\right )\,\left (-640\,a^4\,m+24\,a^2\,b^2\,m^3+552\,a^2\,b^2\,m^2+2208\,a^2\,b^2\,m+3\,b^4\,m^4+78\,b^4\,m^3+797\,b^4\,m^2+3602\,b^4\,m+5880\,b^4\right )\,3{}\mathrm {i}}{64\,b^4\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {\sin \left (5\,c+5\,d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (24\,a^2\,m+5\,b^2\,m^2+79\,b^2\,m+294\,b^2\right )\,\left (m^4+10\,m^3+35\,m^2+50\,m+24\right )\,1{}\mathrm {i}}{64\,b^2\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {a\,m\,\cos \left (6\,c+6\,d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (m^5\,1{}\mathrm {i}+m^4\,15{}\mathrm {i}+m^3\,85{}\mathrm {i}+m^2\,225{}\mathrm {i}+m\,274{}\mathrm {i}+120{}\mathrm {i}\right )}{32\,b\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {3\,a\,m\,\cos \left (4\,c+4\,d\,x\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (-a^2\,20{}\mathrm {i}+b^2\,m^2\,1{}\mathrm {i}+b^2\,m\,17{}\mathrm {i}+b^2\,64{}\mathrm {i}\right )\,\left (m^3+6\,m^2+11\,m+6\right )}{16\,b^3\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {3\,a\,m\,\cos \left (2\,c+2\,d\,x\right )\,\left (m+1\right )\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^m\,\left (a^4\,1920{}\mathrm {i}-a^2\,b^2\,m^2\,32{}\mathrm {i}-a^2\,b^2\,m\,1696{}\mathrm {i}-a^2\,b^2\,7104{}\mathrm {i}+b^4\,m^4\,5{}\mathrm {i}+b^4\,m^3\,134{}\mathrm {i}+b^4\,m^2\,1411{}\mathrm {i}+b^4\,m\,6370{}\mathrm {i}+b^4\,10008{}\mathrm {i}\right )}{32\,b^5\,d\,\left (m^7\,1{}\mathrm {i}+m^6\,28{}\mathrm {i}+m^5\,322{}\mathrm {i}+m^4\,1960{}\mathrm {i}+m^3\,6769{}\mathrm {i}+m^2\,13132{}\mathrm {i}+m\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________